package com.itheima.method;

import java.util.Random;

public class Test6 {
   //查找数组中的元素
    public static void main(String[] args) {
int index = -1;
int num =56;
int[] arr = {11,35,56,56,};
        for (int i = 0; i < arr.length; i++) {
           if(num == arr[i]){
               index = i;
               System.out.println(index);
           }

        }

    }
}